package com.zlz.m3u8download.controller;

import com.zlz.m3u8download.service.FileService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author: zhulinzhong
 * @Date: 2024/12/4
 */
@RestController
@RequestMapping("/file")
public class FileManageController {

    @Resource
    private FileService fileService;

    /**
     * 获取代理url
     * @param url
     * @return
     */
    @GetMapping("/m3u8/{id}")
    public void getM3u8(@PathVariable String id, HttpServletResponse response){
        fileService.getM3u8(id, response);
    }
}
